package com.fhz.mvvm.ui.login;

import androidx.annotation.Nullable;

/**
 * 时间:2023/8/21
 *
 * @author Mr.Feng
 * 简述: 登录表单的状态类,都符合要求,才可以点击登录案例
 */
public class LoginState {

    @Nullable
    private Integer usernameError;
    @Nullable
    private Integer passwordError;

    private boolean isDataValid;

    public LoginState(@Nullable Integer usernameError, @Nullable Integer passwordError, boolean isDataValid) {
        this.usernameError = usernameError;
        this.passwordError = passwordError;
        this.isDataValid = true;
    }

    @Nullable
    public Integer getUsernameError() {
        return usernameError;
    }

    public void setUsernameError(@Nullable Integer usernameError) {
        this.usernameError = usernameError;
    }

    @Nullable
    public Integer getPasswordError() {
        return passwordError;
    }

    public void setPasswordError(@Nullable Integer passwordError) {
        this.passwordError = passwordError;
    }

    public boolean isDataValid() {
        return isDataValid;
    }

    public void setDataValid(boolean dataValid) {
        isDataValid = dataValid;
    }
}
